package com.gmu.service.impl;

import com.gmu.domain.ResResult;
import com.gmu.pojo.TblStudent;
import com.gmu.pojo.TblTeacher;
import com.gmu.mapper.TblTeacherMapper;
import com.gmu.service.TblTeacherService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 教师信息 服务实现类
 * </p>
 *
 * @author testjava
 * @since 2022-07-24
 */
@Service
public class TblTeacherServiceImpl extends ServiceImpl<TblTeacherMapper, TblTeacher> implements TblTeacherService {

    @Autowired
    private TblTeacherMapper tblTeacherMapper;
    //PC端搜索
    @Override
    public ResResult<?> getTblTeacherByCondition(TblTeacher tblTeacher){
        String idNumber = tblTeacher.getIdNumber();
        String name = tblTeacher.getName();
        String telephone = tblTeacher.getTelephone();
        String academy = tblTeacher.getAcademy();
        String department = tblTeacher.getDepartment();
        Integer volunteer = tblTeacher.getVolunteer();

        List<TblTeacher> tblTeachers = tblTeacherMapper.getTeacherByCondition(name, telephone, idNumber,academy,department,volunteer);
        return new ResResult<>(200,tblTeachers);

    }
}
